console.log('x'.padStart(5, 'ab') )// 'ababx'
console.log('x'.padStart(4, 'ab')) // 'abax'

console.log('x'.padEnd(5, 'ab') )// 'xabab'
console.log('x'.padEnd(4, 'ab')) // 'xaba'

console.log('xxx'.padStart(2, 'ab') )// 'xxx'
console.log('xxx'.padEnd(2, 'ab') )// 'xxx'

console.log('abc'.padStart(10, '0123456789'))
// '0123456abc'

console.log('x'.padStart(4)) // '   x'
console.log('x'.padEnd(4)) // 'x   '

console.log('1'.padStart(10, '0') )// "0000000001"
console.log('12'.padStart(10, '0') )// "0000000012"
console.log('123456'.padStart(10, '0')) // "0000123456"